﻿
using Microsoft.AspNetCore.Mvc;
using System.ComponentModel.DataAnnotations;
using System.Diagnostics.CodeAnalysis;

namespace Sdari.Api.DbModel
{
    [ModelMetadataType(typeof(ConsumerInfoMetadata))]
    public partial class ConsumerInfo
    {
        public string Ipv4String
        {
            get
            {

                return Ipv4 == null ? null : $"{Ipv4[0]}.{Ipv4[1]}.{Ipv4[2]}.{Ipv4[3]}";
            }
        }

        internal class ConsumerInfoMetadata
        {
            [Required]
            public string ClientId { get; set; }

            [Required]
            public string Secret { get; set; }
        }
    }
}
